package com.system.service;

import java.util.List;
import java.util.Map;
import java.util.Set;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;

import com.system.entity.Permission;
import com.system.entity.Role;


public interface IRoleService 
{
	public void saveOrUpdate(Role role);
	public void delete(Long id);
	public void delete(List<Long> ids);
	public Role findOne(Long id);
	public Role findPermissionsByRoleName(String roleName);
	public Page<Role> findPage(Specification<Role> spec,Pageable pageable);
	//public Set<Permission> findPermissionsByStaffNum(String roleName);
	//public Map<Staff,Permission[]> findAll();
	List<Role> findByStaffId(Long id);
	Role findPermissionsByRoleId(Long roleId);
	void saveRolePermission(Long rid, List<Long> pIds);
	
	//查找角色权限
	List<Permission> findRolePermission(Long id);
	void save(Role role);
	//查找用户角色
	public List<Role> findStaffRole(Long id);
	
	//保存用户角色
	void saveStaffRole(Long sid, List<Long> rids);
}
